<template>
  <div class="home">
    <div class="hero-section">
      <h1 class="hero-title">MiniTools - 实用小工具集合</h1>
      <p class="hero-subtitle">提供多种实用的小工具，帮助开发者和技术人员快速完成日常任务</p>
    </div>

    <div class="tools-grid">
      <div class="tool-card" @click="$router.push('/finalshell-decrypt')">
        <div class="tool-icon">
          <el-icon size="48" color="#409eff"><Key /></el-icon>
        </div>
        <h3 class="tool-title">FinalShell 密码解密</h3>
        <p class="tool-description">解密 FinalShell 保存的加密密码，支持一键解密和复制功能</p>
      </div>

      <div class="tool-card coming-soon">
        <div class="tool-icon">
          <el-icon size="48" color="#909399"><Picture /></el-icon>
        </div>
        <h3 class="tool-title">字符串转二维码</h3>
        <p class="tool-description">快速将文本字符串转换为二维码图片（即将推出）</p>
      </div>

      <div class="tool-card coming-soon">
        <div class="tool-icon">
          <el-icon size="48" color="#909399"><Tools /></el-icon>
        </div>
        <h3 class="tool-title">更多工具</h3>
        <p class="tool-description">更多实用工具正在开发中...</p>
      </div>
    </div>
  </div>
</template>

<script setup>
import { Key, Picture, Tools } from '@element-plus/icons-vue'
</script>

<style scoped>
.home {
  padding: 40px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-section {
  text-align: center;
  margin-bottom: 60px;
}

.hero-title {
  font-size: 36px;
  color: #303133;
  margin-bottom: 16px;
  font-weight: 600;
}

.hero-subtitle {
  font-size: 18px;
  color: #606266;
  margin: 0;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 40px;
}

.tool-card {
  background: white;
  border-radius: 8px;
  padding: 32px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid #e4e7ed;
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.05);
}

.tool-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px 0 rgba(0, 0, 0, 0.12);
  border-color: #409eff;
}

.tool-card.coming-soon {
  cursor: not-allowed;
  opacity: 0.7;
}

.tool-card.coming-soon:hover {
  transform: none;
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.05);
  border-color: #e4e7ed;
}

.tool-icon {
  margin-bottom: 16px;
}

.tool-title {
  font-size: 20px;
  color: #303133;
  margin-bottom: 12px;
  font-weight: 500;
}

.tool-description {
  font-size: 14px;
  color: #606266;
  line-height: 1.6;
  margin: 0;
}

@media (max-width: 768px) {
  .tools-grid {
    grid-template-columns: 1fr;
  }

  .hero-title {
    font-size: 28px;
  }

  .hero-subtitle {
    font-size: 16px;
  }
}
</style>